home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qgeneric.h.z / qgeneric.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  2.0 KB  |  71 lines

  1. /****************************************************************************
  2. ** $Id: qgeneric.h,v 2.12 1998/07/03 00:09:45 hanord Exp $
  3. **
  4. ** Macros for pasting tokens; utilized by our generic classes
  5. **
  6. ** Created : 920529
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QGENERIC_H
  25. #define QGENERIC_H
  26.  
  27. #ifndef QT_H
  28. #include "qglobal.h"
  29. #endif // QT_H
  30.  
  31.  
  32. // Try to include the system defines where it is sure to exist
  33. #if defined(_CC_SUN_) || (defined(_CC_EDG_) && defined(_OS_IRIX_))
  34. #include <generic.h>
  35. #endif
  36.  
  37.  
  38. // Define Qt generic macros
  39. // At some time in the future, these will be the only #defines left here
  40.  
  41. #if defined(QT_ADD_GENERIC_MACROS)
  42.  
  43. #define Q_NAME2(a,b)        Q_NAME2_AUX(a,b)
  44. #define Q_NAME2_AUX(a,b)    a##b
  45. #define Q_DECLARE(a,t)        Q_NAME2(a,declare)(t)
  46.  
  47. #endif // QT_ADD_GENERIC_MACROS
  48.  
  49.  
  50. // Standard token-pasting macros for ANSI C preprocessors
  51. // We will remove these from Qt in version 2.0 or 3.0
  52.  
  53. #if !defined(declare)
  54.  
  55. #define name2(a,b)        _name2_aux(a,b)
  56. #define _name2_aux(a,b)        a##b
  57. #define name3(a,b,c)        _name3_aux(a,b,c)
  58. #define _name3_aux(a,b,c)    a##b##c
  59. #define name4(a,b,c,d)        _name4_aux(a,b,c,d)
  60. #define _name4_aux(a,b,c,d)    a##b##c##d
  61.  
  62. #define declare(a,t)        name2(a,declare)(t)
  63. #define implement(a,t)        name2(a,implement)(t)
  64. #define declare2(a,t1,t2)    name2(a,declare2)(t1,t2)
  65. #define implement2(a,t1,t2)    name2(a,implement2)(t1,t2)
  66.  
  67. #endif // !declare
  68.  
  69.  
  70. #endif // QGENERIC_H
  71.